Method: Chef::CookbookVersion#<=>

Defined in:
lib/chef/cookbook_version.rb

#<=>(other) ⇒ Object



570
571
572
573
574
575
576
577
# File 'lib/chef/cookbook_version.rb', line 570

def <=>(other)
  raise Chef::Exceptions::CookbookVersionNameMismatch if name != other.name

  # FIXME: can we change the interface to the Metadata class such
  # that metadata.version returns a Chef::Version instance instead
  # of a string?
  Chef::Version.new(version) <=> Chef::Version.new(other.version)
end